/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.crm.action.sale;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.crm.mapper.sale.PotentialCustomerMesMapper;
public class PotentialCustomerMes extends BaseAction
{
    @Autowired(required=false)
	private PotentialCustomerMesMapper mapper;
    /**
    潜在客户短信
    */
    
    public Map potentialCustomerMes() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_note=mapper.s_note(params,pagination);
        s_note.setPagedListInfo(pagination);
        result.put("s_note", s_note);
        
        return result;
    }
    /**
    短信内容
    */
    
    public Map potentialMessage() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> t_note=mapper.t_note(params);
        SQLMap t_note_emt=t_note.getExistfirst();
        result.put("t_note", t_note_emt);
        
        return result;
    }
    /**
    短信选择公共关系电话
    */
    
    public Map potentialCustomerPubP() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> s_phone=mapper.s_phone(params);
        result.put("s_phone", s_phone);
        
        return result;
    }
    /**
    选择短信
    */
    
    public Map potentialCustomerChoiceM() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        params.def("CMID1",-1);
        SQLList<SQLMap> classid=mapper.classid(params);
        result.put("classid", classid);
        
        
        params.def("CMID",-1);
        SQLList<SQLMap> cate=mapper.cate(params);
        SQLMap cate_emt=cate.getExistfirst();
        result.put("cate", cate_emt);
        
        
        
        
        params.def("CMID",-1);
        SQLList<SQLMap> content=mapper.content(params);
        result.put("content", content);
        
        return result;
    }
    /**
    */
    
    public Map d_note() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        mapper.d_note(params);
        
        return result;
    }
    /**
    潜在客户短信修改
    */
    
    public Map potentialCustomerMesSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        for (SQLMap emt:hqlBean.getTableElements("")){
            params=new SQLParam(request,emt.getMap());
            mapper.potentialCustomerMesSubmit(params);
        }
        
        return result;
    }
}